package handzy.id.projects;

import java.util.Scanner;

public class UserInput {
	// Create new scanner instance (global variable).
	Scanner inputScanner = new Scanner(System.in);

	// Getters and Setters
	public Scanner getInputScanner() {
		return inputScanner;
	}

	public void setInputScanner(Scanner inputScanner) {
		this.inputScanner = inputScanner;
	}

	public boolean getBooleanScanner(String message) {
		boolean choice = true;
		String inScan;
		System.out.print(message);
		inScan = inputScanner.next();
		if (inScan.equals("Y") || inScan.equals("y")) {
			choice = true;			
		} else if (inScan.equals("N") || inScan.equals("n")) {
			choice = false;
		} else {
			System.out.println("Please put in Y/N.");
		}
		System.out.println("Your choice is: " + choice);
		return choice;
	}

	public int getCharScanner(String message) {
		int choicechar;
		System.out.print(message);
		choicechar = inputScanner.nextInt();
		System.out.println("You would like " + choicechar + " characters in your password.");
		return choicechar;
	}

}
